.PHONY: mock

pes_parent_dir:=$(shell pwd)/$(lastword $(MAKEFILE_LIST))
build_dir:=$(shell dirname $(pes_parent_dir))
root_dir:=$(shell dirname $(build_dir))

mocktmp=${root_dir}/.out/mock

#registry=127.0.0.1:5000
registry=10.10.10.19:5000


mock:
	-mkdir ${mocktmp} -p
	cp ${root_dir}/tools/Dockerfilemock ${mocktmp}/
	cd ${root_dir}/ && git rev-parse HEAD > ${mocktmp}/VERSION
	rsync -av ${root_dir}/tools/hospitalmock ${mocktmp}/ --exclude=.* --exclude=*.exe
	docker build -t hospital-mock -f Dockerfilemock ${mocktmp}
#	docker tag hospital-mock ${registry}/hospital-mock
#	docker push ${registry}/hospital-mock
